﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace AbstractFactoryPattern
{
    class Program
    {
        static void Main(string[] args)
        {
            AbstractFactory shapeFactory = FactoryProducer.GetFactory(FactoryType.Shape);

            Shape shape1 = shapeFactory.GetShape(ShapeType.CIRCLE);
            shape1.Draw();

            Shape shape2 = shapeFactory.GetShape(ShapeType.RECTANGLE);
            shape2.Draw();

            Shape shape3 = shapeFactory.GetShape(ShapeType.SQUARE);
            shape3.Draw();

            AbstractFactory colorFactory = FactoryProducer.GetFactory(FactoryType.Color);

            Color color1 = colorFactory.GetColor(ColorType.Blue);
            color1.Fill();

            Color color2 = colorFactory.GetColor(ColorType.Green);
            color2.Fill();

            Color color3 = colorFactory.GetColor(ColorType.Red);
            color3.Fill();

            Console.ReadKey();
        }
    }
}
